#include<stdio.h>
#include<math.h>
int main()
{    int i1,i2,j1,j2;
   int sum(int i1,int i2,int j1,int j2);
   int mul(int i1,int i2,int j1,int j2);
	scanf("%d %d",&i1,&i2);
	scanf("%d %d",&j1,&j2);
	sum(i1,i2,j1,j2);
	mul(i1,i2,j1,j2);
}
int sum(int i1,int i2,int j1,int j2)
{
    int i,j;
    i=i1+j1;
    j=i2+j2;
    printf("%d+%di\n",i,j);
    return 0;
}
int mul(int i1,int i2,int j1,int j2)
{
	int i,j;
	i=i1*j1-i2*j2;
	j=i2*j1+i1*j2;
	printf("%d+%di\n",i,j);
    return 0;
}
